package com.rjc.boot.controller;

import com.rjc.boot.python.DetermineCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

//@ResponseBody
//@Controller
@Controller
public class HelloController {
    @Autowired
    DetermineCode determineCode;
    @ResponseBody
    @RequestMapping("/code")
    public Map<String, String> code1(String code, String input){
        Map<String, String> map = new HashMap<>();
        String print = determineCode.getAns(code, input);
        map.put("val", print);
        return map;
    }
    @RequestMapping("/timu")
    public String getTimu(){
        return "timu.html";
    }
    @RequestMapping("/")
    public String Main(){
        return "timu.html";
    }


}
